package com.jiangtour.repository;

import com.jiangtour.dataobject.ConfigureCategory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface ConfigureCategoryRepository extends JpaRepository<ConfigureCategory, Integer>,JpaSpecificationExecutor<ConfigureCategory> {

    @Query(value = " SELECT * FROM configure_category WHERE category_ascription=:id AND category_type= :type",nativeQuery = true)
    List<ConfigureCategory> findByCategoryAscriptionList(@Param(value="id") String id,@Param(value="type") Integer type);
}
